package com.yidu.BusinessData.mapper;

import com.yidu.BusinessData.entity.CashEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;


@Mapper
public interface CashMapper {
    @Select("SELECT * FROM cash where 1=1 ${cashed} ORDER BY cashId limit #{page},#{limit}")
    public List<CashEntity> selectCash(Map map);
    @Select("SELECT count(*) FROM cash where 1=1 ${cashing}")
    public int CashCount(Map map);
    @Insert("insert into cash value(#{cashId},#{fundId},#{bankAccount},#{accounName},#{bankName},#{cashType},#{accounRate},#{day},#{openDate},#{endDate},#{cashBeiZhu}) ")
    public void insertCash(CashEntity cash);
    @Delete("delete from cash where cashId=#{cashId}")
    public void deleteCash(String id);
    @Update("update cash set cashId=#{cashId},bankAccount=#{bankAccount},accounName=#{accounName},bankName=#{bankName},cashType=#{cashType},accounRate=#{accounRate},day=#{day},openDate=#{openDate},endDate=#{endDate},cashBeiZhu=#{cashBeiZhu} where cashId=#{cashId}")
    public void updateCash(CashEntity cashEntity);
}
